###############################################
#Figure 2: Defining Risk Type
#Author: Raluca L. Pahontu
###############################################

require(plotrix)

#Venn Diagram 
pdf("venn.pdf", width = 9.44, height = 7.08)
par(mar = c(0,0.7,0,.5)) 

plot(1:5,seq(1,10,length=5),type="n",xlab="",ylab="", labels=FALSE, frame.plot = FALSE, axes=F)
draw.circle(2.2,7,0.6,border="black",lty=1,lwd=1.2)
draw.circle(3,7,0.6,border="black",lty=1,lwd=1.2)
draw.circle(2.6,5,0.6,border="black",lty=1,lwd=1.2)

text(2.1,7, bquote(rho[2]), size=1.2)
text(3.1,7, bquote(rho[2]), size=1.2)
text(2.6,4.5, bquote(rho[2]), size=1.2)
text(3.3,4.7, bquote(rho[2]), size=1.2)

text(2.6,6.5, bquote(rho[1]), size=1.2)
text(2.25,6, bquote(rho[1]), size=1.2)
text(2.9,6, bquote(rho[1]), size=1.2)
text(2.6,7.3, bquote(rho[1]), size=1.2)

text(2.1,9.3,"Job Secure", size=1.2, font=2)
text(3.1,9.3,"Job Tenure", size=1.2, font=2)
text(3,2.9,"Full Time", size=1.2, font=2)


rect(1.5, 2.35, 4, 10)
rect(3.7, 2.35, 4, 10, col= rgb(0.5,0.5,0.5,alpha=0.25), density=12)
segments(3.7,2.35,3.7,10, col="black")
text(3.85, 6.5, bquote(rho[3]))

dev.off()



